import json

def test_add():
    print(add_numbers(2,6))

def add_numbers(a, b):
    """计算两个数字的和"""
    result = a + b
    return result

def mytest_json():
    """测试json用法"""
    my_data = {}
    my_data["city"] = "dongguan"
    my_data["province"] = "guangdong"
    score = {}
    score["math"] = 90
    score["eng"] = 95
    my_data["score"] = score
    ## 将dict装换成str
    json_str = json.dumps(my_data)
    ## 将str转换成dict
    dict = json.loads(json_str)
    ## 获取dict中的值
    city = dict["city"]
    math = dict["score"]["math"]

if __name__ == '__main__':

    tt = True

    a = 90
    b = 80
    c = 55
    my_list = [a,b,c]
    my_tuple1 = a,b,c
    my_tuple2 = (a,b,c)
    print(my_list.copy())
    print(my_tuple1)
    print(my_tuple2)
    print()
    result = add_numbers(3, 5)
    print(result)

